/******************************************************************************
* Student Name: Ofri Keidar
* Exercise Name: Ex3
* File Description: Class Node's interface. The class represents a node in
* 				    a graph. Node object can be printed using a printing
* 				    operator
******************************************************************************/

#ifndef NODE_H_
#define NODE_H_

#include <iostream>
#include <string>
using namespace std;

class Node {

private:
	int m_number; // the number that the node holds

public:

	/***************************************************************************************
	 * function name: Node(const int number)
	 * The Input: Number that the new node will hold
	 * The output: None
	 * The Function operation: Creates a new Node object whose number attribute is given number
	 ***************************************************************************************/
	Node(const int number);

	/***************************************************************************************
	 * function name: Node(const Node& nodeToCopy)
	 * The Input: Node to be copied
	 * The output: None
	 * The Function operation: Creates a new Node identical to given node
	 ***************************************************************************************/
	Node(const Node& nodeToCopy);

	/***************************************************************************************
	 * function name: ~Node()
	 * The Input: None
	 * The output: None
	 * The Function operation: Destroys Node object
	 ***************************************************************************************/
	~Node();

	/***************************************************************************************
	 * function name: == (const Node& operand) const
	 * The Input: Node operand to compare with
	 * The output: True if given operand is equal to object
	 * The Function operation: Compares node's number attribute. Operator does not
	 * 						   change the object
	 ***************************************************************************************/
	bool operator == (const Node& operand) const;

	/***************************************************************************************
	 * function name: != (const Node& operand) const
	 * The Input: Node operand to compare with
	 * The output: True if given operand is not equal to object
	 * The Function operation: Compares node's number attribute. Operator does not
	 * 						   change the object
	 ***************************************************************************************/
	bool operator != (const Node& operand) const;


	/***************************************************************************************
	 * function name: < (const Node& operand) const
	 * The Input: Node operand to compare with
	 * The output: True if given operand is bigger than object, otherwise False
	 * The Function operation: Compares node's number attribute. Operator does not
	 * 						   change the object
	 ***************************************************************************************/
	bool operator < (const Node& operand) const;

	/***************************************************************************************
	 * function name: > (const Node& operand) const
	 * The Input: Node operand to compare with
	 * The output: True if object is bigger than given operand, otherwise False
	 * The Function operation: Compares node's number attribute. Operator does not
	 * 						   change the object
	 ***************************************************************************************/
	bool operator > (const Node& operand) const;

	/***************************************************************************************
	 * function name: int() const
	 * The Input: None
	 * The output: Node's int value
	 * The Function operation: Returns node's int value
	 ***************************************************************************************/
	operator const int() const {return m_number;} // TODO change conversion operator to toInt()

	/***************************************************************************************
	 * function name: toString() const
	 * The Input: None
	 * The output: String with node's int value
	 * The Function operation: Converts node's number attribute to a string and returns the
	 * 						   string
	 ***************************************************************************************/
	 const string toString() const;

	/***************************************************************************************
	 * function name: operator ++ ()
	 * The Input: None
	 * The output: The graph node object after its value were incremented
	 * The Function operation: Increments node's value
	 ***************************************************************************************/
	Node& operator++();

	/***************************************************************************************
	 * function name: operator -- ()
	 * The Input: None
	 * The output: The graph node object after its value were decremented
	 * The Function operation: Decrements node's value
	 ***************************************************************************************/
	Node& operator--();

//	/***************************************************************************************
//	 * function name: getNumber()
//	 * The Input: None
//	 * The output: The number that the node holds
//	 * The Function operation: Returns node's number attribute. Method does not change the
//	 * 					       Node object
//	 ***************************************************************************************/
//	int getNumber() const {return m_number;}
//
//	/***************************************************************************************
//	 * function name: setNumber(int newNumber)
//	 * The Input: Number to be new value for the node
//	 * The output: None
//	 * The Function operation: Sets node's number attribute as given number
//	 ***************************************************************************************/
//	void setNumber(int newNumber) {m_number = newNumber;} //TODO delete

	/***************************************************************************************
	 * function name: << (ostream &os, const Node& nodeToPrint)
	 * The Input: Reference to Node to be printed
	 * The output: ostream reference
	 * The Function operation: TODO
	 ***************************************************************************************/
	friend ostream& operator << (ostream &os, const Node& nodeToPrint);
};

#endif
